class Debug {
  __New() {
    this.info := ''
    this.delimiter := '`n'
  }

  Join(info) {
    this.info .= '|' info this.delimiter
  }

  Log() {
    MsgBox this.info
  }

  ToString(){
    return this.info
  }
}

if A_LineFile == A_ScriptFullPath {
  d := Debug()
  d.Join('1-abc')
  d.Join('2-abc')
  d.Log()
}